<%@page import="com.wed.db.User_Assi"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@page import="com.wed.db.ConnectDB"%>
<%@page import="com.wed.db.cmapstudent"%>
<%@page import="com.wed.db.User"%>
<%@page import="java.util.ArrayList"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/dataTables.colReorder.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/css/dataTables.colVis.css">

<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/jquery.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/dataTables.colReorder.js"></script>
<script type="text/javascript" language="javascript"
	src="${pageContext.request.contextPath}/js/dataTables.colVis.js"></script>


<script type="text/javascript" language="javascript" class="init">


$(document).ready(function() {
    var table = $('#example').DataTable( {
        dom: 'RC<"clear">lfrtip',
        columnDefs: [
            { visible: false, targets: 1 }
        ]
	} );
} );


	</script>
<title>Insert title here</title>
</head>
<body>
<%String t= request.getParameter("username");
			
String receive = "ReceiveCmStudent.jsp?username="+t;
String view = "BTDaLam_SV.jsp?username="+t;
String btChuaLam = "BTChuaLamSV.jsp?username="+t;
			ArrayList<User_Assi> listAss=new ConnectDB().getAssStudent(t);
			
			%>
			<%User u=new ConnectDB().getClassID(t);
String classID=u.getClassID();
ArrayList<User> user=new ConnectDB().getListStudentByClassID(classID);%>
			<div id="main"><!-- Main starts here -->
<div id="header"><!-- Header starts here -->
	<img src="images/spkt.png" alt="" />
</div><!-- Header ends here -->
<div id="navigation">
<ul>
	<li><a href="#" title=""><font color="black" size="1">Xin Chào Sinh Viên:</font></a></li>
	<li><a href="#" title=""><%=t%></a></li>
</ul>
</div>
<div id="contentHolder"><!-- Content Holder starts here -->
<div id="content"><!-- Content starts here -->
<div id="back">


<div class="clear"></div>

<div id="leftpart">
	<div class="container">
    <h1>Menu</h1>
    <ul>
    	<li><a href="<%=btChuaLam %>">Xem Bài Tập Được Giao</a></li>
       
        <li><a href="<%=view%>">Xem Bài Tập Đã Làm</a></li>
        <li><a href="<%=receive%>">Bài Tập Được Share</a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
        <li><a href="#"></a></li>
    </ul>
    <div class="button"><input type="button" onclick="location.href='DangNhap.jsp'" value="Thoat" class="learnmore" /></div>
    </div>
</div>

<div id="middlepart">
	<table id="example" class="display" cellspacing="0" width="100%">

				<thead>
					<tr background="#800517">

						<td width="10%" height="26" bgcolor="#CC6600">AssignmentID</td>
						<td width="10%" bgcolor="#CC6600">ClassID</td>
						<td width="5%" bgcolor="#CC6600">Date Receive</td>
					
						<td width="10%" bgcolor="#CC6600"></td>
					</tr>
				</thead>
				<tbody>
					<%
				 for(User_Assi ua : listAss){
					 String detailURL = "ChiTietAssiSV.jsp?AssignmentId="+ua.getAss()+"&username="+t;
				
				%>
					<tr>

						<td><%=ua.getAss() %></td>
						<td><%=ua.getClassID() %></td>
						<td><%=ua.getDate() %></td>
						
						<td><a href="<%=detailURL%>">Chi Tiết </a></td>

					</tr>
					<%} %>

				</tbody>
			</table>
    
</div>



<div class="clear"></div>
<!--<div class="bottomImg"><img src="images/bottomBg.png" alt="" /></div>-->
</div>
</div><!-- Content ends here -->
</div><!-- Content Holder ends here -->
<div class="bottomImg"><img src="images/02.png" alt="" /></div>



<div id="footer"><!-- Footer starts here -->
<div lang="copy">Nhóm 5 Lớp 11110CLC</div>
<div class="design"><a href="#">Designed by Ngân-Trường-Hùng</a></div>
<div class="clear"></div>
</div><!-- Footer ends here -->
</div><!-- Main ends here -->
</body>
</html>